package com.example.backend.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 权限数据传输对象
 */
@Data
public class PermissionDTO {
    
    private Long id;
    
    private Long parentId;
    
    @NotBlank(message = "权限名称不能为空", groups = {Create.class})
    @Size(max = 50, message = "权限名称长度不能超过50个字符")
    private String name;
    
    @NotBlank(message = "权限标识不能为空", groups = {Create.class})
    @Size(max = 100, message = "权限标识长度不能超过100个字符")
    private String code;
    
    @NotNull(message = "权限类型不能为空", groups = {Create.class})
    private Integer type;
    
    private String path;
    
    private String component;
    
    private String icon;
    
    private Integer sort;
    
    private Integer status;
    
    /**
     * 创建校验组
     */
    public interface Create {}
    
    /**
     * 更新校验组
     */
    public interface Update {}
} 